<?php

namespace com\aristo\ingenieros\presenter;

include 'com/aristo/ingenieros/model/UserQuery.php';

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

use com\aristo\ingenieros\model\UserQuery;
use com\aristo\ingenieros\view\Response;

/**
 * Description of UserPresenter
 *
 * @author ARISTO INGENIEROS
 */
class UserPresenter {

    /**
     * 
     * @param type $user
     * @param type $password
     * @param type $con
     * @return \com\aristo\ingenieros\view\Response
     */
    public static function getLogin($user, $password, $con) {
        $response = new Response();

        if (isset($user) && isset($password) && isset($con)) {
            $query = UserQuery::getUserLoginModule($user, $password, $con);
            
            $response->setResult($query);
        } else {
            $response->setResult('INGRESE USUARIO Y CONTRASEÑA');
        }
        return $response;
    }

}